package com.study.util;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class MyAapect {
	
	@Around(value = "execution(* com.study.service.MovieUserService.*(..))")
	public Object myAround(ProceedingJoinPoint joinPoint) throws Throwable {
		System.out.println(joinPoint.getSignature().getName() + "---->前方法");
		Object object = joinPoint.proceed();
		System.out.println(joinPoint.getSignature().getName() + "---->后方法");
		return object;
	}

}
